home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / askto.arc / ASKTO.DOC < prev    next >
Encoding:
Text File  |  1987-03-22  |  1.2 KB  |  30 lines

  1.          askto -- "ask" utility with timeout
  2.  
  3. Written by David Dyer-Bennet, and released 22-March-87 to the public
  4. domain.  Anybody may use this for anything.
  5.  
  6. This utility is useful for writing batch files that query the user
  7. and behave differently depending on the answers received.  This
  8. version has the special capability that it can wait a limited amount
  9. of time for an answer, and if none is received, proceed with a
  10. default action.
  11.  
  12. Usage:
  13.   askto [-dseconds] [-adefaultanswer] prompt string to present
  14.  
  15. If -d is not specified, 300 seconds (5 minutes) is allowed.  If -d0
  16. is specified, askto waits forever for a response.
  17.  
  18. if -a is not specified, the default answer is no.
  19.  
  20. A question mark is added to the end of the prompt string if none is
  21. present.  If any of the pieces of the prompt string are enclosed
  22. inquotes (as they might need to be if they contained characters
  23. special to DOS), those quotes are removed.
  24.  
  25. If the answer determined is yes, askto exits with a status of zero.
  26. If the answer determined is no, askto exits with a status of one.
  27. Askto may exit with a status of two if the command line is invalid.
  28.  
  29. Test.bat is an example of a very simple use of askto.
  30.